home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / Information / CSMP Digest / volume 1 / csmp-v1-204.txt < prev    next >
Encoding:
Text File  |  1994-12-08  |  45.0 KB  |  1,146 lines  |  [TEXT/R*ch]

  1. C.S.M.P. Digest             Mon, 02 Nov 92       Volume 1 : Issue 204
  2.  
  3. Today's Topics:
  4.  
  5.     SCSI Disk Format & Initialization
  6.     Launching from a document file
  7.     Finding system folder in system 6
  8.     Double Click in Window Content
  9.     Bug fixes in MPW C 3.2.4
  10.     Think Pascal and ResEdit questions
  11.  
  12.  
  13.  
  14. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  15.  
  16. The digest is a collection of article threads from the internet newsgroup
  17. comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
  18. regularly and want an archive of the discussions.  If you don't know what a
  19. newsgroup is, you probably don't have access to it.  Ask your systems
  20. administrator(s) for details.  (This means you can't post questions to the
  21. digest.)
  22.  
  23. Each issue of the digest contains one or more sets of articles (called
  24. threads), with each set corresponding to a 'discussion' of a particular
  25. subject.  The articles are not edited; all articles included in this digest
  26. are in their original posted form (as received by our news server at
  27. cs.uoregon.edu).  Article threads are not added to the digest until the last
  28. article added to the thread is at least one month old (this is to ensure that
  29. the thread is dead before adding it to the digest).  Article threads that
  30. consist of only one message are generally not included in the digest.
  31.  
  32. The entire digest is available for anonymous ftp from ftp.cs.uoregon.edu
  33. [128.223.8.8] in the directory /pub/mac/csmp-digest.  Be sure to read the
  34. file /pub/mac/csmp-digest/README before downloading any files.  The most
  35. recent issues are available from sumex-aim.stanford.edu [36.44.0.6] in the
  36. directory /info-mac/digest/csmp.  If you don't have ftp capability, the sumex
  37. archive has a mail server; send a message with the text '$MACarch help' (no
  38. quotes) to LISTSERV@ricevm1.rice.edu for more information.
  39.  
  40. The digest is also available via email.  Just send a note saying that you
  41. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  42. automatically receive each new issue as it is created.  Sorry, back issues
  43. are not available through the mailing list.
  44.  
  45. Send administrative mail to mkelly@cs.uoregon.edu.
  46.  
  47.  
  48. -------------------------------------------------------
  49.  
  50. From: kravitz@foxtail.com (Jody Kravitz)
  51. Subject: SCSI Disk Format & Initialization
  52. Organization: The Foxtail Group
  53. Date: Sun, 27 Sep 1992 17:16:11 GMT
  54.  
  55. Could someone explain to me (or point me to the appropriate CURRENT
  56. reference) how it is decided if a SCSI disk is a valid Mac disk.
  57.  
  58. I have used a shareware progrogram SCSI Format&Init to initialize a 40 Meg
  59. drive.  However I find that I must use the 'mountem' FKEY to get it to
  60. mount after a reboot.  This leads me to wonder if the data structures
  61. put on the disk by SCSI Format&Init are current.
  62.  
  63. Thanks
  64.  
  65. Jody
  66.  
  67. +++++++++++++++++++++++++++
  68.  
  69. From: minow@Apple.COM (Martin Minow)
  70. Date: 28 Sep 92 17:43:30 GMT
  71. Organization: Apple Computer Inc., Cupertino, CA
  72.  
  73. In article <1992Sep27.171611.9373@foxtail.com> kravitz@foxtail.com
  74. (Jody Kravitz)  notes that a scsi disk will not automount.
  75.  
  76. The Macintosh SCSI implementation predates ANSI-SCSI by about four years.
  77. Unfortunately, this means that there are a few incompatibilities between
  78. the Mac and "standard" SCSI. Jody is probably being bitten by a requirement
  79. (in "standard" SCSI) for devices to warn the host computer that they have
  80. just been powered up or reset. The sequence is
  81.  
  82. 1. System powers up.
  83. 2. Host computer resets the SCSI bus.
  84. 3. Host computer sends "test unit ready" to see if there's a device.
  85. 4. Device, having just been reset, sends "check condition" (warning) status.
  86. 5. Host computer sends "get extended sense" (give my the error status).
  87. 6. Device sends unit-attention "I've just been reset or powered up"
  88. 7. Host computer sends "test unit ready" again. This time it succeeds.
  89.  
  90. The Mac assumes that any "check condition" indicates an error and skips
  91. the mount. You can work around this by using SCSI Probe (or similar
  92. Control Panels) or an INIT to clear the unit attention condition and retry
  93. the mount. Alternately, the disk manufacturer may choose to add Apple-specific
  94. firmware that supresses power-up unit attention.
  95.  
  96. Hope this clarifies things slightly.
  97.  
  98. Martin Minow
  99. minow@apple.com
  100. ps: the sequence above is more than slightly simplified. Read the Ansi
  101. SCSI-II spec for the gory details.
  102.  
  103. ---------------------------
  104.  
  105. From: paul@svl.cdc.com (Paul Kohlmiller)
  106. Subject: Launching from a document file
  107. Date: 11 Sep 92 23:26:42 GMT
  108.  
  109. I am successfully launching applications via LaunchApplication.
  110. The problem what I would really like to do is launch from a
  111. document not from the application file itself. I want to be able
  112. to do the equivalent of double-clicking a MSWord document and have it
  113. come up with that document open. I think I need something like
  114. LaunchApplicationwithOpenFile but I don't see this in IM Processes or
  115. IM Files (on CD). Getting the application name from the document file
  116. is probably not too hard but how do I get it to launch the app and open
  117. the file, too?
  118. thnx
  119.  
  120. - --
  121.      // Paul H. Kohlmiller             //  "Cybers, Macs and Mips"    //
  122.      // Control Data Systems, Inc.    // Internet: paul@svl.cdc.com  //
  123.      // Acronym under construction.  // America Online: Paul CDC    //
  124.      // All comments are strictly my own. I won't lie but my       //
  125.      // perception of reality is at best a personal hunch.        //
  126.  
  127. +++++++++++++++++++++++++++
  128.  
  129. From: sorchard@crowded-house.den.mmc.com (Steve Orchard)
  130. Date: 14 Sep 92 14:15:11 GMT
  131. Organization: Martin Marietta
  132.  
  133. In article <47491@shamash.cdc.com>, paul@svl.cdc.com (Paul Kohlmiller) writes:
  134. > I am successfully launching applications via LaunchApplication.
  135. > The problem what I would really like to do is launch from a
  136. > document not from the application file itself. I want to be able
  137. > to do the equivalent of double-clicking a MSWord document and have it
  138. > come up with that document open. I think I need something like
  139. > LaunchApplicationwithOpenFile but I don't see this in IM Processes or
  140. > IM Files (on CD). Getting the application name from the document file
  141. > is probably not too hard but how do I get it to launch the app and open
  142. > the file, too?
  143. > thnx
  144.  
  145. You must set the Finder Information first and then launch the Application.
  146. Below is the code I use to do this for system 6.  For system 7 and beyond
  147. use AppleEvents.  Check out the code snippet on ftp.apple.com.
  148.  
  149.  
  150. typedef struct
  151. {
  152.     int            message;    /* Open = 0, Print = 1 */
  153.     int            count;        /* Number of docs selected. */
  154.     AppFile        findinfo;    /* AppFile structure */
  155. } **FindrInfo;
  156.  
  157. void setfinder(thepath,num)
  158. Str255    thepath;
  159. int        num;
  160. {    
  161.     OSErr                err;
  162.     FindrInfo            finderstuff;
  163.     FInfo                finfo;
  164.     int                    i,strsize;
  165.     AppFile                *temp;
  166.         
  167.     err = GetFInfo(thepath,0,&finfo);
  168.     HUnlock(AppParmHandle);
  169.     if(num==1)
  170.         SetHandleSize(AppParmHandle,(Size)(sizeof(AppFile)+4));
  171.     else
  172.         SetHandleSize(AppParmHandle,(Size)(sizeof(AppFile))+(Size)(sizeof(AppParmHandle)));
  173.     MoveHHi(AppParmHandle);
  174.     HLock(AppParmHandle);
  175.     finderstuff = (FindrInfo)AppParmHandle;
  176.     (**finderstuff).message=0;
  177.     (**finderstuff).count=num;
  178.     temp = &(**finderstuff).findinfo;
  179.     for(i=1;i!=num;i++)
  180.     {
  181.         strsize = *temp->fName + 9;
  182.         if((strsize % 2) != 0) strsize=strsize+1;
  183.         temp=(Ptr)temp + strsize;
  184.     }
  185.     temp->fType=finfo.fdType;
  186.     temp->vRefNum=finfo.fdFldr;
  187.     strcpy(temp->fName,thepath);
  188. }
  189.  
  190. Good Luck
  191. Steve Orchard
  192.  
  193. +++++++++++++++++++++++++++
  194.  
  195. From: pablo@malloco.ing.puc.cl (Pablo Millan)
  196. Date: 21 Sep 92 19:37:56 GMT
  197. Organization: Pontificia Universidad Catolica de Chile
  198.  
  199. Paul Kohlmiller (paul@svl.cdc.com) wrote:
  200. : I am successfully launching applications via LaunchApplication.
  201. : The problem what I would really like to do is launch from a
  202. : document not from the application file itself. I want to be able
  203. : to do the equivalent of double-clicking a MSWord document and have it
  204. : come up with that document open. I think I need something like
  205. : LaunchApplicationwithOpenFile but I don't see this in IM Processes or
  206. : IM Files (on CD). Getting the application name from the document file
  207. : is probably not too hard but how do I get it to launch the app and open
  208. : the file, too?
  209. : thnx
  210.  
  211.  
  212. Hi.
  213.  
  214. Get the application name with Desktop Manager IM VI (I haven't see
  215. the new IM). (i can't remember the name)
  216.  
  217. After you launch the application:
  218.  
  219.    Use AppleEvents (type odoc , Open Document) also documented in IM VI.
  220.  
  221. sorry, but i don't know the old way, maybe someone else could help?
  222.  
  223. - --
  224. - ------------------------------------------------------------------------------
  225. Pablo A. Millan L.        |  MIS OPINIONES SON MIAS (pero te las puedo vender)
  226. - ------------------------------------------------------------------------------
  227. email : pablo@seeds.cl    |  Seeds Limitada, Santiago, Chile
  228. - ------------------------------------------------------------------------------
  229. "Research is what I'm doing when I don't know what I'm doing" -- W. von Braun
  230. - --
  231. - ------------------------------------------------------------------------------
  232. Pablo A. Millan L.        |  MIS OPINIONES SON MIAS (pero te las puedo vender)
  233. - ------------------------------------------------------------------------------
  234. email : pablo@seeds.cl    |  Seeds Limitada, Santiago, Chile
  235. - ------------------------------------------------------------------------------
  236. "Research is what I'm doing when I don't know what I'm doing" -- W. von Braun
  237.  
  238. +++++++++++++++++++++++++++
  239.  
  240. From: steve.herman%express@freedom.msfc.nasa.gov (Steve Herman)
  241. Date: 24 Sep 92 14:21:05 GMT
  242. Organization: BCSS
  243.  
  244. In article <1992Sep21.193756.7857@tolten.puc.cl>, pablo@malloco.ing.puc.cl
  245. (Pablo Millan) wrote:
  246. > Paul Kohlmiller (paul@svl.cdc.com) wrote:
  247. > : I am successfully launching applications via LaunchApplication.
  248. > : The problem what I would really like to do is launch from a
  249. > : document not from the application file itself. I want to be able
  250. > : to do the equivalent of double-clicking a MSWord document and have it
  251. > : come up with that document open. I think I need something like
  252. > : LaunchApplicationwithOpenFile but I don't see this in IM Processes or
  253. > : IM Files (on CD). Getting the application name from the document file
  254. > : is probably not too hard but how do I get it to launch the app and open
  255. > : the file, too?
  256. > : thnx
  257. > : 
  258. > Hi.
  259. > Get the application name with Desktop Manager IM VI (I haven't see
  260. > the new IM). (i can't remember the name)
  261. > After you launch the application:
  262. >    Use AppleEvents (type odoc , Open Document) also documented in IM VI.
  263. > sorry, but i don't know the old way, maybe someone else could help?
  264.  
  265. Another way to accomplish this (under System 7) is to send Finder an "Open
  266. Selection" Apple Event.  You place the document you want opened in the
  267. Apple Event and Finder figures out who the application to be launched is.
  268. If the app is not running it gets launched with an 'odoc' event.  If it is
  269. already running, it gets brought to the front and sent an 'odoc' event.
  270.  
  271. There is a code snippet on ETO which does this. I think it's called
  272. SendFinderOpen or something like that.
  273.  
  274. I guess the only problem with this technique is that Finder is always going
  275. to launch the "creator" application. (ie I don't think you could trick it
  276. into opening a TeachText document with MS Word)
  277.  
  278. - ----------------------------------------------------
  279. - - Steve Herman - BCSS
  280. - - Boeing Computer Support Services
  281. - - Huntsville, AL
  282. - ----------------------------------------------------
  283.  
  284. ---------------------------
  285.  
  286. From: udmorrow@mcs.drexel.edu (Daniel Morrow)
  287. Subject: Finding system folder in system 6
  288. Date: 28 Sep 92 02:45:24 GMT
  289. Organization: Drexel University
  290.  
  291. Subject line says it all. I'm writing a program that will
  292. have a preference file. I know how to get the Preferences folder
  293. in System 7. I need to know how to get the System folder in
  294. System 6. Forgive me if this is a FAQ... 
  295.  
  296. Also, what is the best way to tell if system 6 or 7 is running?
  297.  
  298. Thanks in advance.
  299. - -Dan.
  300.  
  301. +++++++++++++++++++++++++++
  302.  
  303. From: grobbins@Apple.COM (Grobbins)
  304. Date: 28 Sep 92 06:29:04 GMT
  305. Organization: Apple Computer Inc., Cupertino, CA
  306.  
  307. In article <1992Sep28.024524.17596@mcs.drexel.edu> udmorrow@mcs.drexel.edu (Daniel Morrow) writes:
  308. >Subject line says it all. I'm writing a program that will
  309. >have a preference file. I know how to get the Preferences folder
  310. >in System 7. I need to know how to get the System folder in
  311. >System 6. 
  312.  
  313. Call FindFolder and ask for the preferences folder (kPreferencesFolderType).
  314. Under System 7, this will return the vRefNum and dirID of the
  315. Preferences folder; under System 6, it will return the vRefNum and
  316. dirID of the System folder (since that is where preferences should be
  317. kept.)  FindFolder is documented on pages 9-42 and following of Inside
  318. Mac VI.  Don't bother to call Gestalt to see if FindFolder is available; 
  319. if you're using Think or MPW C or Pascal, the FindFolder glue
  320. will make certain that FindFolder succeeds on any HFS system.
  321.  
  322. >Also, what is the best way to tell if system 6 or 7 is running?
  323.  
  324. It's best to check if specific features are available, not what
  325. system is running.  Gestalt is typically the way to go; read
  326. chapter 3 of Inside Mac VI.
  327.  
  328. Grobbins          grobbins@apple.com
  329.  
  330. Usual disclaimers apply.
  331.  
  332. ---------------------------
  333.  
  334. From: mgraf@sydvm1.VNET.IBM.COM (Michael Graf)
  335. Date: Mon, 21 Sep 92 09:14:10 EST
  336. Subject: Double Click in Window Content
  337. Organization: Australian Programming Centre (IBMA)
  338.  
  339.   Can anyone please provide me with an algorithm, hint, pointer or advice
  340. which will allow me to detect DOUBLE CLICKs within the content region of
  341. a normal window ?
  342.  
  343.   I can easily detect single MouseDowns, but am not certain the best way
  344. to detect a double click.
  345.  
  346.   Thanx, in advance, for the help...
  347.  
  348.  
  349. **********************************************************************
  350. Regards,
  351.   Michael Graf                INTERNET:    (mgraf@sydvm1.vnet.ibm.com)
  352.                               BITNET:      (mgraf@vnet)
  353. **********************************************************************
  354.  
  355. +++++++++++++++++++++++++++
  356.  
  357. From: cstrockb@cs.sunysb.edu (Caleb Strockbine)
  358. Date: 22 Sep 92 04:20:03 GMT
  359. Organization: SUNY at Stony Brook Computer Science Dept.
  360.  
  361. In article <19920920.161604.28@almaden.ibm.com> mgraf@sydvm1.VNET.IBM.COM (Michael Graf) writes:
  362.      Can anyone please provide me with an algorithm, hint, pointer or advice
  363.    which will allow me to detect DOUBLE CLICKs within the content region of
  364.    a normal window ?
  365.  
  366. You can use the trap GetDblTime() to find the maximum number of ticks 
  367. allowed between the two clicks of a double click. (You can also use
  368. the system global DoubleTime directly, if you prefer globals to traps.)
  369.  
  370. Compare the time between two clicks to see if it's less than the value
  371. returned by GetDblTime(). If it is, and if the clicks are close together,
  372. the click is actually a double click.
  373.  
  374. Caleb.
  375. cstrockb@ic.sunysb.edu
  376.  
  377. +++++++++++++++++++++++++++
  378.  
  379. From: bowman@reed.edu (Eric Bowman (bobo))
  380. Date: 22 Sep 92 03:41:12 GMT
  381. Organization: Reed College, Portland, OR
  382.  
  383. In article <CSTROCKB.92Sep21232004@csws1.cs.sunysb.edu> cstrockb@cs.sunysb.edu (Caleb Strockbine) writes:
  384. >In article <19920920.161604.28@almaden.ibm.com> mgraf@sydvm1.VNET.IBM.COM (Michael Graf) writes:
  385. >     Can anyone please provide me with an algorithm, hint, pointer or advice
  386. >   which will allow me to detect DOUBLE CLICKs within the content region of
  387. >   a normal window ?
  388.  
  389. >You can use the trap GetDblTime() to find the maximum number of ticks 
  390. >allowed between the two clicks of a double click. (You can also use
  391. >the system global DoubleTime directly, if you prefer globals to traps.)
  392.  
  393. >Compare the time between two clicks to see if it's less than the value
  394. >returned by GetDblTime(). If it is, and if the clicks are close together,
  395. >the click is actually a double click.
  396.  
  397. This will work, but it's not quite right.  MPW 411 says this about GetDblTime:
  398.  
  399. GetDblTime returns the suggested maximum difference (in ticks) that should exist
  400. between the times of a mouse-up event and a mouse-down event for those two mouse
  401. clicks to be considered a double-click. The user can adjust this value by means of
  402. the Control Panel desk accessory.
  403.  
  404. So you should catch mouse up events, and note store the time-of-event somewhere,
  405. then check it in your mouse down event catcher.
  406.  
  407. bobo
  408. bowman@reed.edu
  409.  
  410. +++++++++++++++++++++++++++
  411.  
  412. From: mtc@henry.ece.cmu.edu (Magnetic Technology Center)
  413. Organization: dSoft (david's Software)
  414. Date: Tue, 22 Sep 1992 13:46:53 GMT
  415.  
  416. [mgraf@sydvm1.VNET.IBM.COM (Michael Graf) writes:]
  417. [] Can anyone please provide me with an algorithm, hint, pointer or advice
  418. [] which will allow me to detect DOUBLE CLICKs within the content region of
  419. [] a normal window ?
  420.  
  421. [cstrockb@cs.sunysb.edu (Caleb Strockbine) writes:]
  422. [] You can use the trap GetDblTime() to find the maximum number of ticks 
  423. [] ...
  424. [] Compare the time between two clicks to see if it's less than the value
  425. [] returned by GetDblTime(). If it is, and if the clicks are close together,
  426. [] the click is actually a double click.
  427.  
  428. [bowman@reed.edu (Eric Bowman (bobo)) writes:]
  429. [] This will work, but it's not quite right.  MPW 411 says this about
  430. [] GetDblTime: returns the suggested maximum difference (in ticks) that
  431. [] should exist between the times of a mouse-up event and a mouse-down
  432. [] event for those two mouse clicks to be considered a double-click.
  433. [] ...
  434. [] So you should catch mouse up events, and note store the time-of-event
  435. [] somewhere, then check it in your mouse down event catcher.
  436.  
  437. MPW 411 (and IM - Event Manager) does not resolve an idiosyncratic
  438. situation where a mousedown occurs followed by a lengthy pause with
  439. the mouse not moving and then, in rapid succesion, a mouseup and
  440. another mousedown.  This satisfies both GetDblTime() and mouse
  441. movement constraints but generally isn't considered a double click
  442. (since the two mousedowns are not close enough together in time).
  443. This, apparently, is left open for the app writer to resolve.
  444.  
  445.   -dave-
  446. mtc@henry.ece.cmu.edu
  447.  
  448. see also: StillDown(), WaitMouseUp() and IM - Event Manager
  449.  
  450. +++++++++++++++++++++++++++
  451.  
  452. From: sdorner@qualcomm.com (Steven Dorner)
  453. Date: 24 Sep 92 01:44:33 GMT
  454. Organization: Qualcomm, Inc
  455.  
  456. Caleb Strockbine wrote:
  457. > the Finder measures times between mousedown events
  458. > a mouseup and a mousedown.
  459.  
  460. The Finder also uses the wrong paradigm for shift-click in its list
  461. windows.
  462.  
  463. > Since I generally do a lot more double clicking
  464. > in the Finder than anywhere else, and since I assume the average user
  465. > probably does the same, I guess I'll make my futre apps follow the 
  466. > Finder's lead for the sake of consistancy.
  467.  
  468. The Finder is not a paragon of virtue in any sense.  If I had ATP
  469. conformant code, I don't think I'd change it to match the Finder (but your
  470. point about the Finder's prominence is well taken.)
  471.  
  472. >Not that anyone would ever notice...
  473.  
  474. Agreed.
  475.  
  476. > triple clicks, too. I also think nobody uses them because of the difficulty
  477. > some folks have triple clicking.
  478.  
  479. I'm getting pretty used to triple-click as "select paragraph".  I certainly
  480. wouldn't make it the ONLY way to do something, but it can be handy as an
  481. accellerator.
  482.  
  483. +++++++++++++++++++++++++++
  484.  
  485. From: cstrockb@cs.sunysb.edu (Caleb Strockbine)
  486. Date: 25 Sep 92 09:56:19 GMT
  487. Organization: SUNY at Stony Brook Computer Science Dept.
  488.  
  489. In article <sdorner-230992203342@dorner.slip.uiuc.edu> sdorner@qualcomm.com (Steven Dorner) writes:
  490.  
  491.    I'm getting pretty used to triple-click as "select paragraph".  I certainly
  492.    wouldn't make it the ONLY way to do something, but it can be handy as an
  493.    accellerator.
  494.  
  495. Absolutely. I don't have the guidelines handy, but I think there should
  496. always be an alternative to double clicking, too. Double clicking, as well
  497. as Option-, Shift-, or Command-clicking, is a shortcut that's not intuitive
  498. for the novice user. If all of those are used, things can get really hairy
  499. even for the experienced Mac user. I point to Illustrator as an example
  500. of a very difficult-to-master user interface. 
  501.  
  502. Caleb.
  503.  
  504. +++++++++++++++++++++++++++
  505.  
  506. From: jmatthews@desire.wright.edu
  507. Date: 25 Sep 92 05:28:54 GMT
  508. Organization: Wright State University
  509.  
  510. In article <19920922.150650.277@almaden.ibm.com>, mgraf@sydvm1.VNET.IBM.COM (Michael Graf) writes:
  511. >   Can anyone please provide me with an algorithm, hint, pointer or advice
  512. >   which will allow me to detect DOUBLE CLICKs within the content region of
  513. >   a normal window ?
  514.  
  515. For the archives, here's code similar to what I sent Michael.
  516.  
  517.  var gLastMouseUp: EventRecord;
  518.  
  519.  procedure SaveLastMouseUp(event: EventRecord);
  520.  begin
  521.    gLastMouseUp := event
  522.  end;
  523.  
  524.  function CheckDoubleClick (event: EventRecord): Boolean;
  525.    var slop: Rect;
  526.  begin
  527.    with gLastMouseUp.where do
  528.      SetRect(slop, h - 2, v - 2, h + 2, v + 2);
  529.    CheckDoubleClick:= ((event.when - gLastMouseUp.when) <=
  530.      GetDblTime) and (PtInRect(event.where, slop))
  531.  end;
  532.  
  533. In the main event loop, call SaveLastMouseUp in response to mouseUp
  534. events, and call CheckDoubleClick in response to mouseDown events. The
  535. latter returns true when a double click (as defined in IM vol.I,
  536. p.260) occurs.
  537.  
  538. o----------------------------------------------------------------------------o
  539. | John B. Matthews, jmatthews@desire.wright.edu, disclaimer:= myViews <> WSU |
  540. |      "Whom the gods would destroy, they first invite to program in C"      |
  541. o----------------------------------------------------------------------------o
  542.  
  543. +++++++++++++++++++++++++++
  544.  
  545. From: orpheus@reed.edu (P. Hawthorne)
  546. Date: 28 Sep 92 11:29:08 GMT
  547. Organization: Reed College, Portland, OR
  548.  
  549.  
  550.   cstrockb@cs.sunysb.edu (Caleb Strockbine) writes:
  551. : Double clicking, as well as Option-, Shift-, or Command-clicking, is a
  552. : shortcut that's not intuitive for the novice user. If all of those are
  553. : used, things can get really hairy even for the experienced Mac user. I
  554. : point to Illustrator as an example of a very difficult-to-master user
  555. : interface.
  556.  
  557.   I point to Illustrator as the most effective user interface.  It permits
  558. the user to become very expressive. Some short cuts are not intuitive, but
  559. I can assure you that they come to be instinctive. Still, implying that
  560. double clicking is too computery for people seems rather like saying that
  561. if God wanted us to compute, he would have given us mice to fidget with.
  562. People have to do something faintly like learning to communicate with a
  563. computer. It can't be entirely one way. But beyond that...
  564.  
  565.   Difficult-to-master? Yes! Mastering Illustrator is not like mastering a
  566. word processor or some trivial application. You wouldn't write Illustrator
  567. in HyperCard. Lest the user-friendly trappings disguise it, Illustrator is
  568. a Craft and a remarkably interesting subdiscipline of programming at that.
  569.  
  570.   I can't think of anything in Illustrator that one can do with the mouse
  571. and the keyboard that you cannot find in the menus or the toolbox.  Every
  572. short cut has it's representation in the user interface. 
  573.  
  574.  
  575.   Theus (orpheus@reed.edu)
  576.  
  577.   P.S. 
  578.   Sorry for disappearing. I'm living... That might not be the right word.
  579. I'm merely 'in' Utah. I've moved here. I'm not dead exactly, either, but...
  580.  
  581. ---------------------------
  582.  
  583. From: Bruce.Hoult@bbs.actrix.gen.nz
  584. Subject: Bug fixes in MPW C 3.2.4
  585. Date: 21 Sep 92 11:42:11 GMT
  586. Organization: Actrix Information Exchange
  587.  
  588. I don't think I've seen anyone post details of just what exactly was wrong
  589. with MPW C 3.2.3 on ETO #8.
  590.  
  591. Well, I got the special 3.2.4 update posting (dated 18/9/92) today --
  592. kudos to the MPW guys for getting this out quickly.
  593.  
  594. Here is part of the readme file (note that much of it is changes from
  595. 3.2 to 3.2.3):
  596.  
  597. - -----
  598.  
  599. These notes describe changes from MPW C 3.2.3 to 3.2.4
  600.  
  601. The following bugs have been fixed:
  602.  
  603. - - The compiler will sometimes generate incorrect code for complicated
  604. logical expressions containing constants.   The error will occur when
  605. the logical expression is the controlling expression of a conditional
  606. ( ? : ) expression, or on the right side of an assignment statement.
  607. The symptom of this bug is that the logical expression will return the
  608. wrong value.
  609.  
  610. For example the following generates incorrect code:
  611.  
  612.       x = (a > 0) && 1 && (a < 2) ? 1 : 2;
  613.                   or
  614.       x = (a > 0) && 2 && (a < 2);
  615.  
  616. - - The compiler will generate object files with an incorrect value in
  617. the FileID field of a Local Type record.  Depending on the contents of
  618. the object file, the Linker (or Lib) may sometimes complain about the
  619. invalid record.  If the link succeeds, the .SYM file will have
  620. incorrect information; the application will be correct.
  621.  
  622. This bug occurs only when a program uses #pragma load and is compiled
  623. and Linked (or Libd) with -sym on.
  624.  
  625. As a result of this fix, Load/Dump files created with earlier versions
  626. of the C compiler should be rebuilt.
  627.  
  628. - - The compiler will incorrectly evaluate the following construct:
  629.             aa < (bb << cc)
  630.                      or
  631.             aa < (bb >> cc)
  632.  
  633. when aa, bb, and cc are all constant expressions (i.e. either
  634. constants themselves or expressions all of whose operands are
  635. constants), aa is negative, and (bb << cc) or (bb >> cc) is greater
  636. than 65536.
  637.  
  638.  
  639. These notes describe changes from MPW C 3.2 to 3.2.3
  640.  
  641. - - An increase in the number of allowable static strings to above 32K.
  642.  
  643. - - Speed improvements ranging from 6% to 26% in compilation of large
  644. files with the option "-sym on".
  645.  
  646. - - The option "-blksize n" has been added.  The parameter "n" is the
  647. number of 512-byte blocks to be used for the compiler's input buffers.
  648. The range of "n" is from 4 to 63.  You can use this option to tune the
  649. performance of the compiler for your particular hardware
  650. configuration.  The default value of 16 seems to be a reasonable
  651. compromise for most classes of machines.
  652.  
  653. Bug fixes
  654.  
  655. - - The "-mc68020" option used to do an incorrect optimization for
  656. multiplication by twelve.  This would often show up when calculating
  657. an offset in a large array of "extended" values. The bug showed up
  658. only when the value of the result required more than 15 bits.
  659.  
  660. - - The compiler emits ID numbers for use by the Linker and debuggers.
  661. There used to be three ranges of these numbers. If there were enough
  662. symbols in a compilation unit, the number ranges could overlap, giving
  663. bogus symbolic information. The compiler now emits a single contiguous
  664. range of ID numbers, allowing up to 32K symbols to exist in one
  665. compilation unit.
  666.  
  667. - - A logical operator (AND, OR) with a constant operand would sometimes
  668. cause a TEST instruction with an immediate operand to be emitted. This
  669. would cause an "illegal instruction" error at runtime.
  670.  
  671. - - If a function allocated more than 32K of space for local variables,
  672. the compiler would not clean up the stack correctly. The compiler now
  673. detects the situation and emits a correct epilog for such functions.
  674.  
  675. - - If a conditional expression had a function call as one alternative
  676. and a constant as the other, the result of the function call would get trashed.
  677.  
  678. - - The compiler used to create illegal "multiply" instructions that
  679. used address registers as operands.
  680.  
  681. - - There were bugs in the algorithm for dead-code elimination. The
  682. symptoms were that when using the "-b3" option with a function
  683. containing string literals (as in "printf" statements), seemingly
  684. random sections of the function would get trashed. This also happened,
  685. even in the absence of the "-b3" option, when the function contained
  686. floating point constants.
  687.  
  688. - - If a function contained a local static variable, compiling with
  689. "-sym on" would cause random system crashes. Even if crashes did not
  690. occur, the symbolic information for that variable would be garbage.
  691.  
  692. - - The compiler used to abort when a partial pathname was given in the
  693. "-i<filename>" option.
  694.  
  695. - - Crashes occurred when source code contained floating point constants.
  696.  
  697. - - Object files created using "-opt full" but not using any "-bn"
  698. option would fail to link when the source file contained a string literal.
  699.  
  700. - - When evaluating constructs of the form: "ptr++->field = somevalue;",
  701. the address increment was calculated incorrectly in the high order
  702. byte, causing a problem when running in 32-bit addressing mode.
  703.  
  704. - - Crashes sometimes occurred when compiling source using "-sym on"
  705. when the source contained a struct for which some field was created by
  706. a macro expansion.
  707.  
  708. - - Incorrect parameter values were passed when the option "-mc68881"
  709. was used and the parameter was a constant that was explicitly cast to float.
  710.  
  711. - - Logical tests of expressions of the form:
  712.  
  713.      someBooleanExpression && (someVar = pointerArray[i].ptr)
  714.  
  715. failed because the generated code used an LEA instruction to assign
  716. the value of  pointerArray[i].ptr despite the fact that LEA does not
  717. set the condition code. 
  718.  
  719. - - The condition codes were not properly tested in expressions of the form:
  720.       if (x ? 1 : g() )
  721.       if (x ? f() : g() )
  722.  
  723. - - The condition codes were not tested properly when the results of two
  724. function calls were ANDed, e.g., func1() && func2().
  725.  
  726. - - A bitwise OR of two logical expressions failed in some instances
  727. where one or both of the expressions was complex.
  728.  
  729. - - Under the option "-model far", a function pointer referring to a
  730. function in the same segment was set to the code address instead of to
  731. the jump table address.  This would cause the pointer to become
  732. invalid after the code segment was unloaded.  This is now corrected,
  733. provided that the Link version used is from MPW 3.2.2 ( or later).
  734.  
  735. - - A bug in the constant folding of Boolean expressions caused the
  736. generation of the 
  737. illegal instruction TST.L #$0000 when compiling constructs like:
  738.  
  739.    someVar && (someExpression, 1)
  740.    booleanVar = booleanVar && 1;
  741.  
  742. - - The same bug would cause generation of an incorrect test for
  743. constructs like:
  744.    if ((0 || (someVar && !someVar)) && 1)
  745.  
  746. - - A code generation error occurred when a function was declared to
  747. return a pointer to a function.
  748.  
  749. - - A bus error would occur when compiling with "-sym on".
  750. - -- 
  751. Bruce.Hoult@bbs.actrix.gen.nz   Twisted pair: +64 4 477 2116
  752. BIX: brucehoult                 Last Resort:  PO Box 4145 Wellington, NZ
  753. "Cray's producing a 500 MIPS personal computer with 256MB RAM and 8 GB
  754. hard disk that fits in your pocket!"   "Great!  Is it PC compatible?"
  755.  
  756. +++++++++++++++++++++++++++
  757.  
  758. From: holiday@bnr.ca (Matthew Holiday)
  759. Date: 21 Sep 92 21:51:14 GMT
  760. Organization: Bell-Northern Research, Richardson, TX
  761.  
  762. In article <1992Sep21.114211.2561@actrix.gen.nz>, Bruce.Hoult@bbs.actrix.gen.nz writes:
  763. |> I don't think I've seen anyone post details of just what exactly was wrong
  764. |> with MPW C 3.2.3 on ETO #8.
  765. |> 
  766. |> Well, I got the special 3.2.4 update posting (dated 18/9/92) today --
  767. |> kudos to the MPW guys for getting this out quickly.
  768. |> 
  769.  
  770. Where exactly is the updated compiler?  I'd like to get the 3.2.3 C/C++ update from APDA
  771. on CD-ROM, but I won't order it until I know for sure that I'll get a version with the
  772. fixes!  I still remember never getting the 2.0.1 bug fixes to MacApp, even though they
  773. were promised to me when I got that CD in '90 :-(.
  774.  
  775. - -- 
  776. Matt Holiday                                      #include <std/disclaimer>
  777. holiday@bnr.ca
  778. BNR Richardson, TX
  779.  
  780. +++++++++++++++++++++++++++
  781.  
  782. From: Bruce.Hoult@bbs.actrix.gen.nz
  783. Date: 22 Sep 92 02:26:36 GMT
  784. Organization: Actrix Information Exchange
  785.  
  786. In article <1992Sep21.215114.19519@bnr.ca> holiday@bnr.ca writes:
  787. > In article <1992Sep21.114211.2561@actrix.gen.nz>, Bruce.Hoult@bbs.actrix.gen.nz writes:
  788. > |> I don't think I've seen anyone post details of just what exactly was wrong
  789. > |> with MPW C 3.2.3 on ETO #8.
  790. > |> 
  791. > |> Well, I got the special 3.2.4 update posting (dated 18/9/92) today --
  792. > |> kudos to the MPW guys for getting this out quickly.
  793. > |> 
  794. > Where exactly is the updated compiler?  I'd like to get the 3.2.3 C/C++ update from APDA
  795. > on CD-ROM, but I won't order it until I know for sure that I'll get a version with the
  796. > fixes!  I still remember never getting the 2.0.1 bug fixes to MacApp, even though they
  797. > were promised to me when I got that CD in '90 :-(.
  798.  
  799. Sorry I wasn't more specific: it arrived via TNT Skypak International
  800. Express with a little green sticker saying "Priority Service".  It's
  801. just a single floppy disk with compressed versions of C 3.2.4 and C
  802. 3.2.2, a new version of CMarker, and a CExamples folder.
  803.  
  804. I'm just a regular ETO customer, so you chaps in the US of A should
  805. get yours soon :-)
  806.  
  807. - -- Bruce
  808. (who can't quite beleive he seems to be getting stuff first out here in NZ)
  809.  
  810. - -- 
  811. Bruce.Hoult@bbs.actrix.gen.nz   Twisted pair: +64 4 477 2116
  812. BIX: brucehoult                 Last Resort:  PO Box 4145 Wellington, NZ
  813. "Cray's producing a 500 MIPS personal computer with 256MB RAM and 8 GB
  814. hard disk that fits in your pocket!"   "Great!  Is it PC compatible?"
  815.  
  816. +++++++++++++++++++++++++++
  817.  
  818. From: keith@taligent.com (Keith Rollin)
  819. Date: 23 Sep 92 19:59:48 GMT
  820. Organization: Taligent
  821.  
  822. In article <38786@unix.SRI.COM>, mxmora@unix.SRI.COM (Matt Mora) wrote:
  823. > In article <1992Sep21.114211.2561@actrix.gen.nz> Bruce.Hoult@bbs.actrix.gen.nz writes:
  824. > >- A bus error would occur when compiling with "-sym on".
  825. > [Other 26 bug fixes deleted]
  826. > Has THINK C or THINK Pascal ever had that many bugs? They charge you for that
  827. > buggy compiler? :-) How do you MPW heads get anything done?
  828.  
  829. I got this file right here called "About THINK C 5.0.3." It details at
  830. least 48 bugs fixed from THINK C 5.0 to 5.0.3. That doesn't count any of
  831. the documentation errors or "gotchas" that don't quite qualify as bugs.
  832.  
  833. - -----
  834. Keith Rollin
  835. Phantom Programmer
  836. Taligent, Inc.
  837.  
  838. +++++++++++++++++++++++++++
  839.  
  840. From: potts@itl.itd.umich.edu (Paul Potts)
  841. Date: 24 Sep 92 14:26:26 GMT
  842. Organization: Instructional Technology Laboratory, University of Michigan
  843.  
  844. In article <keith-230992125712@kip-58.taligent.com> keith@taligent.com (Keith Rollin) writes:
  845. >In article <38786@unix.SRI.COM>, mxmora@unix.SRI.COM (Matt Mora) wrote:
  846. >> 
  847. >> In article <1992Sep21.114211.2561@actrix.gen.nz> Bruce.Hoult@bbs.actrix.gen.nz writes:
  848. >> Has THINK C or THINK Pascal ever had that many bugs? They charge you for that
  849. >> buggy compiler? :-) How do you MPW heads get anything done?
  850. >> 
  851. >
  852. >I got this file right here called "About THINK C 5.0.3." It details at
  853. >least 48 bugs fixed from THINK C 5.0 to 5.0.3. That doesn't count any of
  854. >the documentation errors or "gotchas" that don't quite qualify as bugs.
  855.  
  856. All compilers have bugs. If you don't find them, it just means you aren't
  857. doing anything difficult... :)
  858.  
  859.  
  860. - -- 
  861. "...remove protective cap. Hold atomizer with thumb at base and nozzle 
  862. between first and second fingers. Without tilting head, insert nozzle into 
  863. nostril. Fully depress rim with a firm, even stroke and sniff deeply."
  864. - -advice for presidential candidates from Paul Potts - potts@itl.itd.umich.edu
  865.  
  866. ---------------------------
  867.  
  868. From: eijkhout@cupid.cs.utk.edu (Victor Eijkhout)
  869. Subject: Think Pascal and ResEdit questions
  870. Date: 28 Sep 92 16:51:55 GMT
  871. Organization: University of Tennessee, Knoxville - Department of Computer Science
  872.  
  873. Hello,
  874.  
  875. working with Think Pascal and ResEdit (and being mondo pissed that the
  876. Pascal manual nowhere mentions that you need ResEdit for creating resources),
  877. I had the following questions:
  878.  
  879. 1/ using system 7 I would like to have both Pascal and ResEdit open, but
  880. if I'm editing the resource, Pascal has trouble finding elements (menubar
  881. for instance) in it. So I have to close the resource every time I want
  882. to test run the program. Is there an explanation / work-around for this?
  883.  
  884. 2/ I have programmed mouse-and-menu programs before on the Atari ST, and
  885. the resource construction programs there gave you a possibility to
  886. give symbolic names to items in the resource, which you then used in your
  887. program. This way alterations in the resource do not necessitate alterations
  888. in the program. Is such a thing possible with ResEdit, combined with Think
  889. Pascal?
  890.  
  891. Thanks in advance.
  892.  
  893. Victor.
  894.  
  895. +++++++++++++++++++++++++++
  896.  
  897. From: tree@kira.uvm.edu (Tom Emerson)
  898. Date: 28 Sep 92 18:22:01 GMT
  899. Organization: University of Vermont, EMBA Computer Facility
  900.  
  901. In article <lcee1bINNlej@utkcs2.cs.utk.edu> eijkhout@cupid.cs.utk.edu (Victor Eijkhout) writes:
  902.  
  903.    1/ using system 7 I would like to have both Pascal and ResEdit open, but
  904.    if I'm editing the resource, Pascal has trouble finding elements (menubar
  905.    for instance) in it. So I have to close the resource every time I want
  906.    to test run the program. Is there an explanation / work-around for this?
  907.  
  908. There is no workaround. The resource file can *not* be open in two
  909. applications simultaneously. One way to deal with that is to put your resource
  910. file in the open special item in ResEdit's File menu.
  911.  
  912.    2/ I have programmed mouse-and-menu programs before on the Atari ST, and
  913.    the resource construction programs there gave you a possibility to
  914.    give symbolic names to items in the resource, which you then used in your
  915.    program. This way alterations in the resource do not necessitate alterations
  916.    in the program. Is such a thing possible with ResEdit, combined with Think
  917.    Pascal?
  918.  
  919. Not as such. You can define a group of constants in your source file for
  920. particular parts of your dialog or for resource id's. I'm not sure I
  921. understand how the symbolic names of the Atari system differ from the resource
  922. id's used with the Mac?
  923.  
  924. Tom
  925. - --
  926.    Tom Emerson                                    Technical Support
  927.    Language Products Group                     Symantec Corporation
  928.             Internet: tree@uvm.edu
  929.  
  930. +++++++++++++++++++++++++++
  931.  
  932. From: eijkhout@cupid.cs.utk.edu (Victor Eijkhout)
  933. Date: 28 Sep 92 18:32:46 GMT
  934. Organization: University of Tennessee, Knoxville - Department of Computer Science
  935.  
  936. In article <TREE.92Sep28132201@kira.uvm.edu>, tree@kira.uvm.edu (Tom Emerson) writes:
  937. |> In article <lcee1bINNlej@utkcs2.cs.utk.edu> eijkhout@cupid.cs.utk.edu (Victor Eijkhout) writes:
  938. |> 
  939. |>    2/ I have programmed mouse-and-menu programs before on the Atari ST, and
  940. |>    the resource construction programs there gave you a possibility to
  941. |>    give symbolic names to items in the resource, which you then used in your
  942. |>    program. This way alterations in the resource do not necessitate alterations
  943. |>    in the program. Is such a thing possible with ResEdit, combined with Think
  944. |>    Pascal?
  945. |> 
  946. |> Not as such. You can define a group of constants in your source file for
  947. |> particular parts of your dialog or for resource id's. I'm not sure I
  948. |> understand how the symbolic names of the Atari system differ from the resource
  949. |> id's used with the Mac?
  950.  
  951. On the Atari the resource construction program yielded a .RSC file
  952. with the resource and a .RSD file with for C 'define' and for Pascal
  953. 'Const' statements equating for instance
  954.  Const File_menu = 129,
  955. where in the res. program you have told that 'File_menu' is the label
  956. for the file menu.
  957.  
  958. This file is then loaded into your program, and you only have
  959. to remember the name 'File_menu', and not its ID. I seem to remember
  960. that there were reasons why you wanted to renumber in a resource every
  961. once in a while, and then these names are very convenient.
  962.  
  963. If I've understood ResEdit correctly, then the number of an item in a 
  964. menu is simply the number of the line it appears on. This is awful:
  965. If I insert a menu item higher up I have to change the item ID in
  966. my program. Have I really understood this correctly?
  967.  
  968. |> Tom
  969.  
  970. Victor.
  971.  
  972. +++++++++++++++++++++++++++
  973.  
  974. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  975. Date: 28 Sep 92 18:59:28 GMT
  976. Organization: Kalamazoo College
  977.  
  978. eijkhout@cupid.cs.utk.edu (Victor Eijkhout) writes:
  979. >tree@kira.uvm.edu (Tom Emerson) writes:
  980. >|>eijkhout@cupid.cs.utk.edu (Victor Eijkhout) writes:
  981. >|> 
  982. >|>    2/ I have programmed mouse-and-menu programs before on the Atari ST, and
  983. >|>    the resource construction programs there gave you a possibility to
  984. >|>    give symbolic names to items in the resource, which you then used in your
  985. >|>    program.
  986. >|>    ... Is such a thing possible with ResEdit, combined with Think
  987. >|>    Pascal?
  988. >|> 
  989. >|> Not as such.
  990. >
  991. >On the Atari the resource construction program yielded a .RSC file
  992. >with the resource and a .RSD file with for C 'define' and for Pascal
  993. >'Const' statements...
  994. >
  995. >This file is then loaded into your program, and you only have
  996. >to remember the name 'File_menu', and not its ID.
  997. >
  998. >If I've understood ResEdit correctly, then the number of an item in a 
  999. >menu is simply the number of the line it appears on. This is awful:
  1000. >If I insert a menu item higher up I have to change the item ID in
  1001. >my program. Have I really understood this correctly?
  1002.  
  1003. Yes, you have.  A nice extension to Think C 4.0.x, "4Plus", provided
  1004. this and many other features.  (Not for menu items, though--it would
  1005. produce a .h file that did 'enum's attaching resource names to IDs.
  1006. So you could change menu numbers on the fly, but not menu items.)
  1007.  
  1008. This would be a way-cool tool, if someone wanted to write it--a
  1009. drag-n-drop app that accepted any file, and spelled out its resources in
  1010. some clean header file.  Preferences would include:  whether to write a
  1011. C or Pascal header;  the prefix for all the constants ("r", for
  1012. example);  whether to convert "two word" to "two_word" or "twoWord";
  1013. and so on.  The option of writing separate files for separate groups of
  1014. resources would be nice too--when I change a menu item, I don't want to
  1015. have to recompile all my C files that #include the enumerations of the
  1016. 'snd ' resources.
  1017.  
  1018. Hmmm.  If I didn't already have six things on the back burners, I'd
  1019. consider tossing this one on too.  Or has it been done already?
  1020. - -- 
  1021.  Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
  1022.  "To flame someone on an open forum is, to me, the height of insensitivity."
  1023.    - P.J. Plauger
  1024.  
  1025. +++++++++++++++++++++++++++
  1026.  
  1027. From: jbush@magnus.acs.ohio-state.edu (J Eric Bush)
  1028. Date: 28 Sep 92 19:54:08 GMT
  1029. Organization: The Ohio State University
  1030.  
  1031. In article <lcee1bINNlej@utkcs2.cs.utk.edu> eijkhout@cupid.cs.utk.edu (Victor E
  1032. ijkhout) writes:
  1033. >Hello,
  1034. >
  1035. >working with Think Pascal and ResEdit (and being mondo pissed that the
  1036. >Pascal manual nowhere mentions that you need ResEdit for creating resources),
  1037. >I had the following questions:
  1038. >
  1039. >1/ using system 7 I would like to have both Pascal and ResEdit open, but
  1040. >if I'm editing the resource, Pascal has trouble finding elements (menubar
  1041. >for instance) in it. So I have to close the resource every time I want
  1042. >to test run the program. Is there an explanation / work-around for this?
  1043. >
  1044. >2/ I have programmed mouse-and-menu programs before on the Atari ST, and
  1045. >the resource construction programs there gave you a possibility to
  1046. >give symbolic names to items in the resource, which you then used in your
  1047. >program. This way alterations in the resource do not necessitate alterations
  1048. >in the program. Is such a thing possible with ResEdit, combined with Think
  1049. >Pascal?
  1050. >
  1051. >Thanks in advance.
  1052. >
  1053. >Victor.
  1054. >
  1055. >
  1056.  
  1057. 1/ ResEdit will mark a file as being opened with the ability to read and
  1058.    write so another program can't have access to it at the same time.  The
  1059.    best work around is use the "Modify Menu" option in ResEdit so that
  1060.    command-1 opens the resource you want to edit.  Edit it, then close it
  1061.    when returning to Pascal, it can access everything just fine.  When you
  1062.    want to go back to ResEdit switch to it under mutilfinder and press
  1063.    command-1 and your back to editting your resource.  BTW, Think Pascal
  1064.    manuals do mention ResEdit all over the place.  Each of the examples
  1065.    are based on ResEdit and it comes with the program.
  1066.  
  1067. 2/ If you want to use symbolic names, you have to use the ResEdit Get Info
  1068.    command and then type in a name for the resource.  Note: I have given
  1069.    names to resources, but do not use them in programs, so if this doesn't
  1070.    work, forget where you heard this.
  1071.  
  1072. Eric
  1073. - -- 
  1074. - ------------------------------------------------------------------------------
  1075. J. Eric Bush
  1076. Internet: jbush@magnus.acs.ohio-state.edu
  1077.  
  1078. +++++++++++++++++++++++++++
  1079.  
  1080. From: peter@cujo.curtin.edu.au (Peter N Lewis)
  1081. Date: 29 Sep 92 03:30:55 GMT
  1082. Organization: NCRPDA, Curtin University
  1083.  
  1084. In article <lcee1bINNlej@utkcs2.cs.utk.edu>, eijkhout@cupid.cs.utk.edu
  1085. (Victor Eijkhout) wrote:
  1086.  
  1087. > 1/ using system 7 I would like to have both Pascal and ResEdit open, but
  1088. > if I'm editing the resource, Pascal has trouble finding elements (menubar
  1089. > for instance) in it. So I have to close the resource every time I want
  1090. > to test run the program. Is there an explanation / work-around for this?
  1091.  
  1092. No, there is no workaround, but once you've selected the resource file
  1093. once, ResEdit remembers where you looked, so reopening it is generally not
  1094. too difficult, and the suggestion of putting the resource file in the Open
  1095. Special menu in ResEdit was a good one (assuming you only have a few
  1096. projects at once :-)
  1097.  
  1098. > 2/ I have programmed mouse-and-menu programs before on the Atari ST, and
  1099. > the resource construction programs there gave you a possibility to
  1100. > give symbolic names to items in the resource, which you then used in your
  1101. > program. This way alterations in the resource do not necessitate alterations
  1102. > in the program. Is such a thing possible with ResEdit, combined with Think
  1103. > Pascal?
  1104.  
  1105. There is no app to do this to my knowledge.  What I did was implement
  1106. fmnu's ala Finder, which creates a mapping between an OSType (eg 'quit')
  1107. and menu's (eg thew 'Quit/Q' menu).  In my code I do things like:
  1108.  
  1109. SetFCommand('quit',@DoQuit)
  1110.  
  1111. And then when a menu is chosen, its OSType is found and the relevent
  1112. procedure is called.  It also associates an Enable procedure with each
  1113. menu, to grey/ungrey the menu as appropriate.
  1114.  
  1115. The code for this is in my Talk sources, which are available on
  1116. redback.cs.uwa.edu.au:/others/peterlewis (as well as on sumex and umich). 
  1117. Thanks to Quinn and UWA Comp Sci for providing this site.
  1118.  
  1119. HTH,
  1120.    Peter.
  1121.  
  1122. _______________________________________________________________________
  1123. Peter N Lewis, NCRPDA, Curtin University       peter@cujo.curtin.edu.au
  1124. GPO Box U1987, Perth WA 6001, AUSTRALIA             FAX: +61 9 367 8141
  1125.  
  1126. ---------------------------
  1127.  
  1128. End of C.S.M.P. Digest
  1129. **********************
  1130.